package com.jsb.laundry.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jsb.laundry.model.dto.HistoricalOrdersRequest;
import com.jsb.laundry.model.entity.JsbOrdersFulfillment;
import com.jsb.laundry.model.vo.FindByOrderInfoItemVo;
import com.jsb.laundry.model.vo.HistoricalOrdersDetailsListVo;
import com.jsb.laundry.model.vo.HistoricalOrdersVo;
import com.jsb.laundry.model.vo.PrintOrderNumberVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrdersFulfillmentDao extends BaseMapper<JsbOrdersFulfillment> {
    /**
     * 查询订单详细信息
     *
     * @param orderId
     * @return
     */
    List<FindByOrderInfoItemVo> findByOrderInfoItem(String orderId);

    /**
     * 骑手拍照放在指定位置
     *
     * @param orderId
     * @return
     */
    int upImg(@Param("orderId") String orderId, @Param("img") String img);

    /**
     * 查询订单方向
     *
     * @param orderId
     * @return
     */
    int findByOrderDirection(String orderId);

    /**
     * 派单历史
     *
     * @return
     */
    List<HistoricalOrdersVo> findByHistoricalOrders(HistoricalOrdersRequest historicalOrdersRequest);

    /**
     * 查询关注
     *
     * @param userId
     * @return
     */
    int findByFollow(String userId);

    /**
     * 查询收派历史详情
     *
     * @return
     */
    HistoricalOrdersDetailsListVo findByHistoricalOrdersDetails(@Param("userId") String userId, @Param("orderId") String orderId);

    /**
     * 查询订单走向状态
     * @param userId
     * @param orderId
     * @return
     */
    List<HistoricalOrdersDetailsListVo.OrderStatusInfo> findByOrderStatusLog(@Param("userId") String userId, @Param("orderId") String orderId);

    /**
     * 打印单号
     * @param orderId
     * @return
     */
    List<PrintOrderNumberVo> printOrderNumber(String orderId);

    /**
     * 更改小站订单状态
     * @param orderId
     * @return
     */
    int updateShopsStatus(String orderId);
}
